package views;

import java.awt.EventQueue;

import javax.swing.JInternalFrame;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JPanel;
import java.awt.SystemColor;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.border.TitledBorder;
import javax.swing.JLabel;
import javax.swing.JTextField;
import java.awt.Color;
import javax.swing.JButton;

public class Event extends JInternalFrame {
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;

	/**
	 * Launch the application.
	 */

	/**
	 * Create the frame.
	 */
	public Event() {
		setMaximizable(true);
		//setClosed(false);
		setTitle("\u00E9v\u00E8nement");
		setIconifiable(true);
		setClosable(true);
		setBounds(0, 0, 614, 414);
		
		JPanel panelData = new JPanel();
		panelData.setBackground(SystemColor.inactiveCaption);
		panelData.setBorder(new TitledBorder(null, "Cr\u00E9er un \u00E9v\u00E8nement", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panelData.setForeground(SystemColor.inactiveCaptionBorder);
		
		JPanel panelButton = new JPanel();
		panelButton.setBackground(SystemColor.inactiveCaption);
		GroupLayout groupLayout = new GroupLayout(getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addComponent(panelButton, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 578, Short.MAX_VALUE)
						.addComponent(panelData, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 588, Short.MAX_VALUE))
					.addContainerGap())
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(panelData, GroupLayout.PREFERRED_SIZE, 290, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(panelButton, GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)
					.addContainerGap())
		);
		
		JButton btnSauvegarder = new JButton("Sauvegarder");
		panelButton.add(btnSauvegarder);
		
		JLabel lblNomDeLvnement = new JLabel("Nom de l'\u00E9v\u00E8nement");
		
		textField = new JTextField();
		textField.setColumns(10);
		
		JLabel lblNomDeLa = new JLabel("Nom du circuit");
		
		textField_1 = new JTextField();
		textField_1.setColumns(10);
		
		JLabel lblLongueur = new JLabel("Longueur");
		
		textField_2 = new JTextField();
		textField_2.setColumns(10);
		GroupLayout gl_panelData = new GroupLayout(panelData);
		gl_panelData.setHorizontalGroup(
			gl_panelData.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panelData.createSequentialGroup()
					.addGap(21)
					.addGroup(gl_panelData.createParallelGroup(Alignment.LEADING)
						.addComponent(lblNomDeLvnement)
						.addComponent(lblNomDeLa))
					.addGap(31)
					.addGroup(gl_panelData.createParallelGroup(Alignment.LEADING, false)
						.addComponent(textField, GroupLayout.PREFERRED_SIZE, 340, GroupLayout.PREFERRED_SIZE)
						.addGroup(gl_panelData.createSequentialGroup()
							.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, 125, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(lblLongueur)
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(textField_2)))
					.addContainerGap(77, Short.MAX_VALUE))
		);
		gl_panelData.setVerticalGroup(
			gl_panelData.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panelData.createSequentialGroup()
					.addGap(29)
					.addGroup(gl_panelData.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblNomDeLvnement)
						.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(gl_panelData.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblNomDeLa)
						.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(lblLongueur)
						.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addContainerGap(182, Short.MAX_VALUE))
		);
		panelData.setLayout(gl_panelData);
		getContentPane().setLayout(groupLayout);

	}

}
